﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin_MasterPage.master" AutoEventWireup="true" CodeFile="DanhSachNhaSanXuat.aspx.cs" Inherits="Admin_DanhSachLoaiSanPham" %>

<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
    function checkAll(obj)
    {
        var checkList = document.getElementsByTagName("input");
        for(var i = 0 ; i < checkList.length ; i++)
        { 
	        if(checkList[i].type == 'checkbox' && 
	        checkList[i].id.indexOf("cb_Delete") >= 0 )
	        {
		        checkList[i].checked = obj.checked;
	        }
        }		  
    }
</script>
<div id="alldanhsachloaisanpham">   
            <span class="TieuDe">Danh sách Nhà sản xuất</span><br />
            
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <Triggers>
     <asp:AsyncPostBackTrigger ControlID="pager" EventName="Command" />
     <asp:AsyncPostBackTrigger ControlID="btn_Delete" EventName="Click" />
     </Triggers>
        <ContentTemplate>
            <div class="clear"></div>
            <div id="timkiem" style="border-bottom-style:solid; border-bottom-width:thin; background-color:#f3f3f3; color:#8B4513; font-weight:bold; margin-top:10px;">
                    Tên nhà sản xuất:&nbsp;<asp:TextBox ID="txt_tennsx" runat="server"></asp:TextBox> &nbsp;
                    <asp:Button CssClass="button" ID="btn_timkiem" runat="server" Text="Tìm Kiếm"
                        onclick="btn_timkiem_Click" />
                        <div class="align-right" style=" margin-bottom:5px;">
                                <asp:HyperLink CssClass="button" ID="btn_Themnsx" NavigateUrl="~/Admin/ThemNhaSanXuat.aspx" runat="server">Thêm nhà sản xuất</asp:HyperLink>
                            </div>
                </div>
                <div class="clear"></div>
            <asp:Repeater ID="repeater_nsx" runat="server" 
                onitemdatabound="repeater_nsx_ItemDataBound" >
            
                <HeaderTemplate>       
                <table border="1px" style="width:100%" width="100%">
                <tr class="TieuDeTable" style="border-bottom-style:solid; border-bottom-width:medium; text-align:center; background-color:#f3f3f3;">
                    <td>STT</td>
                    <td>Tên nhà sản xuất</td>
                    <td>Cập nhật</td>
                    <td align="center"><input id="chb_CheckAll" onclick="checkAll(this);" type="checkbox" />Xóa</td>
                </tr>
                </HeaderTemplate>
                <ItemTemplate>

                <tr style="color:Black;">
                    <td><asp:Label ID="lb_STT" runat="server"></asp:Label></td>
                    <td><%# Eval("TenNhaSanXuat")%>
                    </td>
                    <td>
                         <asp:HyperLink ID="hyp_Update" runat="server">Cập nhật</asp:HyperLink>
                    </td>
                    <td>
                    <asp:CheckBox ID="cb_Delete" runat="server" />
                     <asp:HiddenField ID="hf_ID" runat="server" />
                </td>
                </tr>                
                </ItemTemplate>
                <FooterTemplate>
                       </table>
                </FooterTemplate>
            </asp:Repeater>
            <div class="clear"></div>
        <div id="pager1">
                   
                    <!--BEGIN: phan trang-->
                                
            <cc1:PagerV2_8 ID="pager" runat="server" GeneratePagerInfoSection="False"  
                FirstClause="First" Font-Underline="False"
                                     NextClause="Next" PreviousClause="Previous" 
                oncommand="pager_Command" ForeColor="#33CC33" Width="200"/>
                
       </div>
       <!--END: phan trang--> 
                    
                    <!-- End .pagination -->
                    <div class="align-right">
                                <asp:Button CssClass="button" ID="btn_Delete" runat="server" Text="Xóa" 
                                    onclick="btn_Delete_Click"/>
                            </div>
            
                            
          <div class="clear"></div>
          </ContentTemplate>
     </asp:UpdatePanel>
    </div> <!--End alldanhsachsanpham-->
</asp:Content>

